package com.javabean;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.model.TangDBUtil;



public class listdetaildev {
	public String[] detaildev(String didString) {
		String nameString ="";
		String serialString="";
		String modelString ="";
		String venderString="";
		String mdateString="";
		String edateString="";
		String depart="";
		String remark="";
		String devuser="";
		String sqlString = "select * from device where did=?";
		String[] param = {didString};
		int[] which={1};
		try {
			TangDBUtil connectDB = new TangDBUtil();
			ResultSet rs=connectDB.executeQuery(sqlString, param, 1, which);
			System.out.println("RS!");
			System.out.println(rs);
			if(rs.next()){
				System.out.println("RS!");
				nameString=rs.getString("type");
				serialString=rs.getString("serial");
				modelString=rs.getString("model");
				venderString=rs.getString("vender");
				mdateString=rs.getString("mdate");
				edateString=rs.getString("edate");
				depart=rs.getString("department");
				remark=rs.getString("remark");
				devuser=rs.getString("username");
			}
			
		} catch (SQLException e) {
			e.printStackTrace();
		}
		String[] result = {nameString,serialString,modelString,venderString,mdateString,edateString,depart,remark,devuser};
		return result;
	}
}
